package com.example.origin.logtrace.config;

import com.example.origin.logtrace.filter.LogTraceFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {

    @Bean
    public FilterRegistrationBean<LogTraceFilter> logTraceFilter() {
        FilterRegistrationBean<LogTraceFilter> bean = new FilterRegistrationBean<>();
        bean.setFilter(new LogTraceFilter());
        bean.addUrlPatterns("/*");
        return bean;
    }
}
